		<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Faulty</title>

<style type="text/css">
/* <![CDATA[ */

table, td
{
    border-color: #666;
    border-style: solid;
}
table, th
{
    border-color: #666;
    border-style: solid;
}

table
{
    border-width: 0 0 1px 1px;
    border-spacing: 0;
    border-collapse: collapse;
}
 
td
{
    margin: 0;
    padding: 4px;
    border-width: 1px 1px 0 0;
}
th
{
    margin: 0;
    padding: 4px;
    border-width: 1px 1px 0 0;
}

/* ]]> */
</style>

<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>

<script language="javascript">

</script>

</head>

<body style="font-family:Arial, Helvetica, sans-serif;"> 
<form id="form1" name="form1" method="post" > 
	<?php $stfDetail = new Model_DbTable_Roster_Stafflogindetail();?>
	<?php if($this->jobList){?>
			<h2>Manager Approval For Out of Warranty Job</h2>
			<?php foreach ($this->jobList as $shop => $list){?>
			
					<?php if(!empty($list)){?>
							<table width="700" border="1" cellspacing="0" cellpadding="10" style="font-size:15px;">		
								<tr>
									<th colspan = "9">Shop:<?php echo $shop?></th>
								</tr>
								<tr>
									<th>Job Id:</th>
									<th>Repair Staff:</th>
									<th>Date:</th>
									<th>Model:</th>
									<th>Invoice:</th>
									<th>Warranty Staff:</th>
									<th colspan = "2">Action</th>
									<th>Reason</th>
								</tr>
								<?php foreach ($list as $k => $v){?>
										<tr>
											<td><a href = "http://approd9h4leb60v4olh1v.phonecollection.com.au/repaircenter/viewdetail/jobid/<?php echo $v['id_job'];?>" target = "_blank"><?php echo $v['id_job']?></a> </td>
											<?php if($v['repair_staff']){$stf = $stfDetail->getDetail($v['repair_staff']);}else{$stf['ni'] = 'Null';}?>
											<?php if($v['repair_staff']){$wStf = $stfDetail->getDetail($v['warranty_by']);}else{$wStf['ni'] = 'Null';}?>
											<td><?php echo $stf['ni']?></td>
											<td><?php echo $v['date_start']." ".$v['time_start']?></td>
											<td><?php echo $v['mobile_model']?></td>
											<td><?php echo $v['invoice_no']?></td>
											<td><?php echo $wStf['ni']?></td>
											<td><input type = "submit" name = "accept[<?php echo $v['id_job']?>]" value = "Accept"></input></td>
											<td><input type = "submit" name = "reject[<?php echo $v['id_job']?>]" value = "Reject"></input></td>
											<td><input type = "text" name = "reason[<?php echo $v['id_job']?>]" ></input></td>
										</tr>
								<?php }?>
							</table>
							<br/><br/>
				 	<?php }?>
					  
			<?php }?>	
			
			
			<h2>Reject History</h2>
			<?php foreach ($this->jobHistory as $shop => $list){?>
			
					<?php if(!empty($list)){?>
							<table width="700" border="1" cellspacing="0" cellpadding="10" style="font-size:15px;">		
								<tr>
									<th colspan = "6">Shop:<?php echo $shop?></th>
								</tr>
								<tr>
									<th>Job Id:</th>
									<th>Repair Staff:</th>
									<th>Date:</th>
									<th>Model:</th>
									<th>Invoice:</th>
									<th>Warranty Staff:</th>
								</tr>
								<?php foreach ($list as $k => $v){?>
										<tr>
											<td><a href = "http://approd9h4leb60v4olh1v.phonecollection.com.au/repaircenter/viewdetail/jobid/<?php echo $v['id_job'];?>" target = "_blank"><?php echo $v['id_job']?></a> </td>
											<?php if($v['repair_staff']){$stf = $stfDetail->getDetail($v['repair_staff']);}else{$stf['ni'] = 'Null';}?>
											<?php if($v['repair_staff']){$wStf = $stfDetail->getDetail($v['warranty_by']);}else{$wStf['ni'] = 'Null';}?>
											<td><?php echo $stf['ni']?></td>
											<td><?php echo $v['date_start']." ".$v['time_start']?></td>
											<td><?php echo $v['mobile_model']?></td>
											<td><?php echo $v['invoice_no']?></td>
											<td><?php echo $wStf['ni']?></td>
			
										</tr>
								<?php }?>
							</table>
							<br/><br/>
				 	<?php }?>
					  
			<?php }?>
			
			
	<?php }else{?>
			<h2>Manager Approval For Out Warranty Job</h2>
			Please input password:<input type = "password" name = "password" ></input><br/><br/>
			<input type = "submit" name = "submit" value = "Submit"></input>
	<?php }?>
</form>
<br/><br/>
</body>
</html>